#define _CRT_SECURE_NO_WARNINGS

/*
* 链接：https://acm.hdu.edu.cn/showproblem.php?pid=2056
* 题目：Rectangles
*/

#include<iostream>

using namespace std;

struct Rectangles {
	double arr[4];
};

double max(double x, double y) {
	return x > y ? x : y;
}

double min(double x, double y) {
	return x < y ? x : y;
}

void order(Rectangles* change) {
	Rectangles temp = *change;
	change->arr[0] = min(temp.arr[0], temp.arr[2]);
	change->arr[1] = min(temp.arr[1], temp.arr[3]);
	change->arr[2] = max(temp.arr[0], temp.arr[2]);
	change->arr[3] = max(temp.arr[1], temp.arr[3]);
}

double calculate(Rectangles first, Rectangles second) {
	double leftmax = max(first.arr[0], second.arr[0]);
	double rightmin = min(first.arr[2], second.arr[2]);
	double bottommax = max(first.arr[1], second.arr[1]);
	double topmin = min(first.arr[3], second.arr[3]);

	if (leftmax < rightmin && bottommax < topmin) {
		return (rightmin - leftmax) * (topmin - bottommax);
	}
	return 0.0;
}

int main() {
    Rectangles first, second;
    while (cin >> first.arr[0] >> first.arr[1] >> first.arr[2] >> first.arr[3]
           >> second.arr[0] >> second.arr[1] >> second.arr[2] >> second.arr[3]) {
        order(&first);
        order(&second);
        printf("%.2lf\n", calculate(first, second));
    }
    return 0;
}